﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.Library;
using System.Data;
using IHISCETeim.BLL;
using System.Text;
using IHISCETeim.Model;
namespace IHISCETeim.Web.MachineSys.PartsModel
{
    public partial class PartsReport1 : EasyUIPageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "PartsReport1";
            }
        }
       

        protected string SaleDateFrom
        {
            get
            {
                return GetRequestValue<string>("SaleDateFrom", "2005-01-01");

            }
        }
        protected string SaleDateTo
        {
            get
            {
                return GetRequestValue<string>("SaleDateTo", DateTime.Now.Year.ToString()+"-12-31");

            }
        }
       
        protected override string query()
        {
            DataTableCollection dts = PartsDebtController.PartsDebtReport1(SaleDateFrom, SaleDateTo,DateTime.Now.ToString("yyyy-MM-dd"));


            return ToDataGridJson(dts[0], TotalCount, dts[1]).ToString();
        }
    }
}